import cards_tools

if __name__ == '__main__':
    while True:
        cards_tools.show_manu()
        action = input("请输入操作类型：")
        print("您选择的操作是: %s" % action)

        if action in ['1.txt', '2', '3']:
            if action == '1.txt':
                cards_tools.new_card()
            elif action == '2':
                cards_tools.show_all()
            elif action == '3':
                cards_tools.search_card()
        elif action == '0':
            print("欢迎再次使用【名片管理系统】")
            break
        else:
            print("您输入的操作有误，请重新输入")